package com.diet.system.domain;

import com.diet.common.annotation.Excel;
import com.diet.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 饮食用户对象 diet_user
 */
public class DietUser extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 用户ID */
    private String userId;

    /** 用户姓名 */
    @Excel(name = "用户姓名")
    private String userName;

    /** 手机号码 */
    @Excel(name = "手机号码")
    private String phone;

    /** 性别（0女 1男） */
    @Excel(name = "性别", readConverterExp = "0=女,1=男")
    private String gender;

    /** 年龄 */
    @Excel(name = "年龄")
    private Integer age;

    /** 身高(cm) */
    @Excel(name = "身高")
    private Double height;

    /** 体重(kg) */
    @Excel(name = "体重")
    private Double weight;

    /** 职业 */
    @Excel(name = "职业")
    private String occupation;

    /** 身体活动水平 */
    @Excel(name = "活动水平", readConverterExp = "1=轻活动,2=中活动,3=重活动")
    private int activityLevel;

    // DietUser.java
    @Excel(name = "口味偏好", readConverterExp = "香辣、咸鲜、麻辣、甜味、酸甜、清淡")
    private String flavorPreference; // 口味偏好，如“偏辣”“偏甜”“偏酸”


    /** 健康状况 */
    @Excel(name = "健康状况")
    private String healthStatus;

    /** 最后登录时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastLoginTime;

    public String getFlavorPreference() {
        return flavorPreference;
    }

    public void setFlavorPreference(String flavorPreference) {
        this.flavorPreference = flavorPreference;
    }

    public void setUserId(String userId) 
    {
        this.userId = userId;
    }

    public String getUserId() 
    {
        return userId;
    }

    public void setUserName(String userName) 
    {
        this.userName = userName;
    }

    public String getUserName() 
    {
        return userName;
    }

    public void setPhone(String phone) 
    {
        this.phone = phone;
    }

    public String getPhone() 
    {
        return phone;
    }

    public void setGender(String gender) 
    {
        this.gender = gender;
    }

    public String getGender() 
    {
        return gender;
    }

    public void setAge(Integer age) 
    {
        this.age = age;
    }

    public Integer getAge() 
    {
        return age;
    }

    public void setHeight(Double height) 
    {
        this.height = height;
    }

    public Double getHeight() 
    {
        return height;
    }

    public void setWeight(Double weight) 
    {
        this.weight = weight;
    }

    public Double getWeight() 
    {
        return weight;
    }

    public void setOccupation(String occupation) 
    {
        this.occupation = occupation;
    }

    public String getOccupation() 
    {
        return occupation;
    }

    public void setActivityLevel(int activityLevel)
    {
        this.activityLevel = activityLevel;
    }

    public int getActivityLevel()
    {
        return activityLevel;
    }

    public void setHealthStatus(String healthStatus) 
    {
        this.healthStatus = healthStatus;
    }

    public String getHealthStatus() 
    {
        return healthStatus;
    }

    public void setLastLoginTime(Date lastLoginTime) 
    {
        this.lastLoginTime = lastLoginTime;
    }

    public Date getLastLoginTime() 
    {
        return lastLoginTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("userId", getUserId())
            .append("userName", getUserName())
            .append("phone", getPhone())
            .append("gender", getGender())
            .append("age", getAge())
            .append("height", getHeight())
            .append("weight", getWeight())
            .append("occupation", getOccupation())
            .append("activityLevel", getActivityLevel())
            .append("healthStatus", getHealthStatus())
            .append("createTime", getCreateTime())
            .append("lastLoginTime", getLastLoginTime())
            .toString();
    }
}